<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../vue.js"></script>
    <style>
        .beRed{
            color: red;
        }
    </style>
</head>
<body>
    <!-- 点击按钮，将该按钮的颜色变为红色 -->
    <div id="app">
        <div v-for="(item, index) in applications">
        <button :class="{beRed: touchIndex===index}" @click="touchIndex = index">
            {{index}} - {{item}}
        </button>
        <br>
        </div>
    </div>
    <script src="./vue.js"></script>
</body>
</html>